package io.renren.modules.canteens.dao;

import io.renren.common.dao.BaseDao;
import io.renren.modules.canteens.dto.AuxiliaryMaterialsmxDTO;
import io.renren.modules.canteens.dto.CollarmxDTO;
import io.renren.modules.canteens.entity.CollarmxEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 辅材领用明细表
 *
 * @author 罗胜平 781757616@qq.com
 * @since 1.0.0 2019-11-22
 */
@Mapper
public interface CollarmxDao extends BaseDao<CollarmxEntity> {

    @Select("SELECT sum(unit_price*arrival_num) as totalPrice from  canteens_collarmx where collar_id = '${collarId}' ")
    CollarmxDTO getTotalPrice(long collarId);
    @Select("SELECT sum(unit_price*arrival_num) as totalPrice from  canteens_collarmx where collar_id = '${collarId}'  ")
    CollarmxDTO getTotalMony(long collarId);
}